home *** CD-ROM | disk | FTP | other *** search
/ An Introduction to Progr…l Basic 6.0 (4th Edition) / An Introduction to Programming using Visual Basic 6.0.iso / PROGRAMS / CH4 / 4-2-7.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1998-11-02  |  1.5 KB  |  53 lines

  1. VERSION 5.00
  2. Begin VB.Form frm4_2_7 
  3.    Caption         =   "Using Form_Load"
  4.    ClientHeight    =   1515
  5.    ClientLeft      =   1110
  6.    ClientTop       =   1485
  7.    ClientWidth     =   4710
  8.    BeginProperty Font 
  9.       Name            =   "MS Sans Serif"
  10.       Size            =   8.25
  11.       Charset         =   0
  12.       Weight          =   700
  13.       Underline       =   0   'False
  14.       Italic          =   0   'False
  15.       Strikethrough   =   0   'False
  16.    EndProperty
  17.    LinkTopic       =   "Form1"
  18.    PaletteMode     =   1  'UseZOrder
  19.    ScaleHeight     =   1515
  20.    ScaleWidth      =   4710
  21.    Begin VB.PictureBox picArea 
  22.       Height          =   375
  23.       Left            =   120
  24.       ScaleHeight     =   315
  25.       ScaleWidth      =   4395
  26.       TabIndex        =   1
  27.       Top             =   240
  28.       Width           =   4455
  29.    End
  30.    Begin VB.CommandButton cmdCompute 
  31.       Caption         =   "Compute Area"
  32.       Height          =   495
  33.       Left            =   720
  34.       TabIndex        =   0
  35.       Top             =   840
  36.       Width           =   2775
  37.    End
  38. Attribute VB_Name = "frm4_2_7"
  39. Attribute VB_GlobalNameSpace = False
  40. Attribute VB_Creatable = False
  41. Attribute VB_PredeclaredId = True
  42. Attribute VB_Exposed = False
  43. Dim pi As Single
  44. Private Sub Form_Load()
  45.   'Assign a value to pi
  46.   pi = 3.14159
  47. End Sub
  48. Private Sub cmdCompute_Click()
  49.   'Display the area a circle of radius 5
  50.   picArea.Cls
  51.   picArea.Print "The area of a circle of radius 5 is"; pi * 5 * 5
  52. End Sub
  53.